package com.caogen.cg_wl_kt.vmodel.notific

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.map

/**
 * 项目名称: cg_wl_kt
 * Packages:com.caogen.cg_wl_kt.vmodel.notific
 * author: FSW
 * 创建日期: 2024/2/29 16:16
 * Describe:
 *
 */

class NotificPageViewModel : ViewModel() {

    private val _index = MutableLiveData<Int>()


//    val text: LiveData<String> = Transformations.map(_index) {
//        "Hello world from section: $it"
//    }

    private val _text = MutableLiveData<String>().map {
        "Hello world from section: $it"
    }
    val text: LiveData<String> = _text



    fun setIndex(index: Int) {
        _index.value = index
    }
}
